﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bdcs.Core.Entity
{
    /// <summary>
    /// wx_devspec数据模型对象
    /// </summary>
    [Serializable]
    public partial class wx_devspecMod
    {
        /// <summary>
        /// 初始化wx_devspec数据模型对象
        /// </summary>
        public wx_devspecMod()
        {
            
        }
        /// <summary>
        /// 初始化wx_devspec数据模型对象并给在SQL中不能为空的字段赋值
        /// </summary>
        /// <param name="specid">specid</param>
        /// <param name="speccaption">speccaption</param>
        /// <param name="sprice">sprice</param>
        /// <param name="starttime">starttime</param>
        /// <param name="endtime">endtime</param>
        /// <param name="inuse">inuse</param>
        /// <param name="isDel">isDel</param>
        public wx_devspecMod(string specid,string speccaption,decimal sprice,DateTime starttime,DateTime endtime,int inuse,int isDel)
        {
            //给specid字段赋值
            this.Specid = specid;
            //给speccaption字段赋值
            this.Speccaption = speccaption;
            //给sprice字段赋值
            this.Sprice = sprice;
            //给starttime字段赋值
            this.Starttime = starttime;
            //给endtime字段赋值
            this.Endtime = endtime;
            //给inuse字段赋值
            this.Inuse = inuse;
            //给isDel字段赋值
            this.IsDel = isDel;
        }
        /// <summary>
        /// 初始化wx_devspec数据模型对象并给所有字段赋值
        /// </summary>
        /// <param name="specid">specid</param>
        /// <param name="speccaption">speccaption</param>
        /// <param name="sprice">sprice</param>
        /// <param name="starttime">starttime</param>
        /// <param name="endtime">endtime</param>
        /// <param name="inuse">inuse</param>
        /// <param name="remark">remark</param>
        /// <param name="isDel">isDel</param>
        public wx_devspecMod(string specid,string speccaption,decimal sprice,DateTime starttime,DateTime endtime,int inuse,string remark,int isDel)
        {
            //给specid字段赋值
            this.Specid = specid;
            //给speccaption字段赋值
            this.Speccaption = speccaption;
            //给sprice字段赋值
            this.Sprice = sprice;
            //给starttime字段赋值
            this.Starttime = starttime;
            //给endtime字段赋值
            this.Endtime = endtime;
            //给inuse字段赋值
            this.Inuse = inuse;
            //给remark字段赋值
            this.Remark = remark;
            //给isDel字段赋值
            this.IsDel = isDel;
        }
        
		//属性存储数据的变量
        private string _specid;
        private string _speccaption;
        private decimal _sprice;
        private DateTime _starttime;
        private DateTime _endtime;
        private int _inuse;
        private string _remark;
        private int _isDel;
        
        /// <summary>
        /// specid
        /// </summary>
        public string Specid
        {
            get { return this._specid; }
            set { this._specid = value; }
        }
        /// <summary>
        /// speccaption
        /// </summary>
        public string Speccaption
        {
            get { return this._speccaption; }
            set { this._speccaption = value; }
        }
        /// <summary>
        /// sprice
        /// </summary>
        public decimal Sprice
        {
            get { return this._sprice; }
            set { this._sprice = value; }
        }
        /// <summary>
        /// starttime
        /// </summary>
        public DateTime Starttime
        {
            get { return this._starttime; }
            set { this._starttime = value; }
        }
        /// <summary>
        /// endtime
        /// </summary>
        public DateTime Endtime
        {
            get { return this._endtime; }
            set { this._endtime = value; }
        }
        /// <summary>
        /// inuse
        /// </summary>
        public int Inuse
        {
            get { return this._inuse; }
            set { this._inuse = value; }
        }
        /// <summary>
        /// remark
        /// </summary>
        public string Remark
        {
            get { return this._remark; }
            set { this._remark = value; }
        }
        /// <summary>
        /// isDel
        /// </summary>
        public int IsDel
        {
            get { return this._isDel; }
            set { this._isDel = value; }
        }
        
        /// <summary>
        /// 对比两个wx_devspec数据模型对象是否一致
        /// </summary>
        /// <param name="obj">要进行比对的wx_devspec数据模型对象</param>
        /// <returns>返回是否一致，为true一致，为false不一致</returns>
        public override bool Equals(object obj)
        {
            //判断传入对象是否为null
            if (obj == null) return false;
            //将传入对象转换成wx_devspec数据模型对象
            wx_devspecMod wx_devspecMod = obj as wx_devspecMod;
            //判断是否转换成功
            if (wx_devspecMod == null) return false;
            //进行匹配属性的值
            return
                //判断specid是否一致
                this.Specid == wx_devspecMod.Specid &&
                //判断speccaption是否一致
                this.Speccaption == wx_devspecMod.Speccaption &&
                //判断sprice是否一致
                this.Sprice == wx_devspecMod.Sprice &&
                //判断starttime是否一致
                this.Starttime == wx_devspecMod.Starttime &&
                //判断endtime是否一致
                this.Endtime == wx_devspecMod.Endtime &&
                //判断inuse是否一致
                this.Inuse == wx_devspecMod.Inuse &&
                //判断remark是否一致
                this.Remark == wx_devspecMod.Remark &&
                //判断isDel是否一致
                this.IsDel == wx_devspecMod.IsDel;
        }
        /// <summary>
        /// 将当前wx_devspec数据模型对象转换成哈希码
        /// </summary>
        /// <returns>哈希值</returns>
        public override int GetHashCode()
        {
            //将wx_devspec数据模型对象的属性进行按位异或运算处理得到哈希码并返回
            return
                //将specid进行按位异或运算处理
                (this.Specid == null ? 2147483647 : this.Specid.GetHashCode()) ^
                //将speccaption进行按位异或运算处理
                (this.Speccaption == null ? 2147483647 : this.Speccaption.GetHashCode()) ^
                //将sprice进行按位异或运算处理
                this.Sprice.GetHashCode() ^
                //将starttime进行按位异或运算处理
                this.Starttime.GetHashCode() ^
                //将endtime进行按位异或运算处理
                this.Endtime.GetHashCode() ^
                //将inuse进行按位异或运算处理
                this.Inuse.GetHashCode() ^
                //将remark进行按位异或运算处理
                (this.Remark == null ? 2147483647 : this.Remark.GetHashCode()) ^
                //将isDel进行按位异或运算处理
                this.IsDel.GetHashCode();
        }
        /// <summary>
        /// 将当前wx_devspec数据模型对象转换成字符串副本【仅显示在SQL中不能为空的列】
        /// </summary>
        /// <returns>字符串形式副本</returns>
        public override string ToString()
        {
            //将当前wx_devspec数据模型对象转换成字符串副本
            return
                "[" +
                //将specid转换成字符串
                this.Specid + "," +
                //将speccaption转换成字符串
                this.Speccaption + "," +
                //将sprice转换成字符串
                this.Sprice + "," +
                //将starttime转换成字符串
                this.Starttime + "," +
                //将endtime转换成字符串
                this.Endtime + "," +
                //将inuse转换成字符串
                this.Inuse + "," +
                //将isDel转换成字符串
                this.IsDel +
                "]";
        }
    }
}
